package com.mr.orderclient.api;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

/**
 * Class: RestTemplateConfig
 * User (作者):MRui
 * TODO (描述)：使用RestTemplate的方式实现服务之间通讯
 * Date 2018-11-07 22:57
 */
@Component
public class RestTemplateConfig {

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
